<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var g, s, b
      document.write("水仙花数有：<br>")
      for (var i = 100; i < 1000; i++) {
        b = parseInt(i / 100)
        s = parseInt((i - 100 * b) / 10)
        g = i - 100 * b - 10 * s
        if (i == b * b * b + s * s * s + g * g * g) {
          document.write(i, "<br>")
        }
      }
    </script>
  </body>
</html>
